home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / widget / nsIAppShell.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  6KB  |  210 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIAppShell.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIAppShell_h__
  6. #define __gen_nsIAppShell_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIEventQueue;
  18. /**
  19.  * Flags for the getNativeData function.
  20.  * See GetNativeData()
  21.  */
  22. #define NS_NATIVE_SHELL   0
  23. class nsIWidget;
  24.  
  25. /* starting interface:    nsIAppShell */
  26. #define NS_IAPPSHELL_IID_STR "a0757c31-eeac-11d1-9ec1-00aa002fb821"
  27.  
  28. #define NS_IAPPSHELL_IID \
  29.   {0xa0757c31, 0xeeac, 0x11d1, \
  30.     { 0x9e, 0xc1, 0x00, 0xaa, 0x00, 0x2f, 0xb8, 0x21 }}
  31.  
  32. class NS_NO_VTABLE nsIAppShell : public nsISupports {
  33.  public: 
  34.  
  35.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IAPPSHELL_IID)
  36.  
  37.   /**
  38.   * Creates an application shell
  39.   */
  40.   /* void Create (inout int argc, inout string argv); */
  41.   NS_IMETHOD Create(int *argc, char **argv) = 0;
  42.  
  43.   /**
  44.   * Enter an event loop.
  45.   * Don't leave until application exits.
  46.   */
  47.   /* void Run (); */
  48.   NS_IMETHOD Run(void) = 0;
  49.  
  50.   /**
  51.   * Prepare to process events. 
  52.   */
  53.   /* void Spinup (); */
  54.   NS_IMETHOD Spinup(void) = 0;
  55.  
  56.   /**
  57.   * Prepare to stop processing events.  
  58.   */
  59.   /* void Spindown (); */
  60.   NS_IMETHOD Spindown(void) = 0;
  61.  
  62.   /**
  63.   * An event queue has been created or destroyed. Hook or unhook it from
  64.   * your system, as necessary.
  65.   * @param aQueue the queue in question
  66.   * @param aListen PR_TRUE for a new queue wanting hooking up. PR_FALSE
  67.   *                for a queue wanting to be unhooked.
  68.   */
  69.   /* void ListenToEventQueue (in nsIEventQueue aQueue, in PRBool aListen); */
  70.   NS_IMETHOD ListenToEventQueue(nsIEventQueue * aQueue, PRBool aListen) = 0;
  71.  
  72.   /**
  73.   * After event dispatch execute app specific code
  74.   */
  75.   /* void GetNativeEvent (in PRBoolRef aRealEvent, in voidPtrRef aEvent); */
  76.   NS_IMETHOD GetNativeEvent(PRBool & aRealEvent, void * & aEvent) = 0;
  77.  
  78.   /**
  79.   * After event dispatch execute app specific code
  80.   */
  81.   /* void DispatchNativeEvent (in PRBool aRealEvent, in voidPtr aEvent); */
  82.   NS_IMETHOD DispatchNativeEvent(PRBool aRealEvent, void * aEvent) = 0;
  83.  
  84.   /**
  85.   * Exit the handle event loop
  86.   */
  87.   /* void Exit (); */
  88.   NS_IMETHOD Exit(void) = 0;
  89.  
  90. };
  91.  
  92. /* Use this macro when declaring classes that implement this interface. */
  93. #define NS_DECL_NSIAPPSHELL \
  94.   NS_IMETHOD Create(int *argc, char **argv); \
  95.   NS_IMETHOD Run(void); \
  96.   NS_IMETHOD Spinup(void); \
  97.   NS_IMETHOD Spindown(void); \
  98.   NS_IMETHOD ListenToEventQueue(nsIEventQueue * aQueue, PRBool aListen); \
  99.   NS_IMETHOD GetNativeEvent(PRBool & aRealEvent, void * & aEvent); \
  100.   NS_IMETHOD DispatchNativeEvent(PRBool aRealEvent, void * aEvent); \
  101.   NS_IMETHOD Exit(void); 
  102.  
  103. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  104. #define NS_FORWARD_NSIAPPSHELL(_to) \
  105.   NS_IMETHOD Create(int *argc, char **argv) { return _to Create(argc, argv); } \
  106.   NS_IMETHOD Run(void) { return _to Run(); } \
  107.   NS_IMETHOD Spinup(void) { return _to Spinup(); } \
  108.   NS_IMETHOD Spindown(void) { return _to Spindown(); } \
  109.   NS_IMETHOD ListenToEventQueue(nsIEventQueue * aQueue, PRBool aListen) { return _to ListenToEventQueue(aQueue, aListen); } \
  110.   NS_IMETHOD GetNativeEvent(PRBool & aRealEvent, void * & aEvent) { return _to GetNativeEvent(aRealEvent, aEvent); } \
  111.   NS_IMETHOD DispatchNativeEvent(PRBool aRealEvent, void * aEvent) { return _to DispatchNativeEvent(aRealEvent, aEvent); } \
  112.   NS_IMETHOD Exit(void) { return _to Exit(); } 
  113.  
  114. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  115. #define NS_FORWARD_SAFE_NSIAPPSHELL(_to) \
  116.   NS_IMETHOD Create(int *argc, char **argv) { return !_to ? NS_ERROR_NULL_POINTER : _to->Create(argc, argv); } \
  117.   NS_IMETHOD Run(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Run(); } \
  118.   NS_IMETHOD Spinup(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Spinup(); } \
  119.   NS_IMETHOD Spindown(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Spindown(); } \
  120.   NS_IMETHOD ListenToEventQueue(nsIEventQueue * aQueue, PRBool aListen) { return !_to ? NS_ERROR_NULL_POINTER : _to->ListenToEventQueue(aQueue, aListen); } \
  121.   NS_IMETHOD GetNativeEvent(PRBool & aRealEvent, void * & aEvent) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNativeEvent(aRealEvent, aEvent); } \
  122.   NS_IMETHOD DispatchNativeEvent(PRBool aRealEvent, void * aEvent) { return !_to ? NS_ERROR_NULL_POINTER : _to->DispatchNativeEvent(aRealEvent, aEvent); } \
  123.   NS_IMETHOD Exit(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Exit(); } 
  124.  
  125. #if 0
  126. /* Use the code below as a template for the implementation class for this interface. */
  127.  
  128. /* Header file */
  129. class nsAppShell : public nsIAppShell
  130. {
  131. public:
  132.   NS_DECL_ISUPPORTS
  133.   NS_DECL_NSIAPPSHELL
  134.  
  135.   nsAppShell();
  136.  
  137. private:
  138.   ~nsAppShell();
  139.  
  140. protected:
  141.   /* additional members */
  142. };
  143.  
  144. /* Implementation file */
  145. NS_IMPL_ISUPPORTS1(nsAppShell, nsIAppShell)
  146.  
  147. nsAppShell::nsAppShell()
  148. {
  149.   /* member initializers and constructor code */
  150. }
  151.  
  152. nsAppShell::~nsAppShell()
  153. {
  154.   /* destructor code */
  155. }
  156.  
  157. /* void Create (inout int argc, inout string argv); */
  158. NS_IMETHODIMP nsAppShell::Create(int *argc, char **argv)
  159. {
  160.     return NS_ERROR_NOT_IMPLEMENTED;
  161. }
  162.  
  163. /* void Run (); */
  164. NS_IMETHODIMP nsAppShell::Run()
  165. {
  166.     return NS_ERROR_NOT_IMPLEMENTED;
  167. }
  168.  
  169. /* void Spinup (); */
  170. NS_IMETHODIMP nsAppShell::Spinup()
  171. {
  172.     return NS_ERROR_NOT_IMPLEMENTED;
  173. }
  174.  
  175. /* void Spindown (); */
  176. NS_IMETHODIMP nsAppShell::Spindown()
  177. {
  178.     return NS_ERROR_NOT_IMPLEMENTED;
  179. }
  180.  
  181. /* void ListenToEventQueue (in nsIEventQueue aQueue, in PRBool aListen); */
  182. NS_IMETHODIMP nsAppShell::ListenToEventQueue(nsIEventQueue * aQueue, PRBool aListen)
  183. {
  184.     return NS_ERROR_NOT_IMPLEMENTED;
  185. }
  186.  
  187. /* void GetNativeEvent (in PRBoolRef aRealEvent, in voidPtrRef aEvent); */
  188. NS_IMETHODIMP nsAppShell::GetNativeEvent(PRBool & aRealEvent, void * & aEvent)
  189. {
  190.     return NS_ERROR_NOT_IMPLEMENTED;
  191. }
  192.  
  193. /* void DispatchNativeEvent (in PRBool aRealEvent, in voidPtr aEvent); */
  194. NS_IMETHODIMP nsAppShell::DispatchNativeEvent(PRBool aRealEvent, void * aEvent)
  195. {
  196.     return NS_ERROR_NOT_IMPLEMENTED;
  197. }
  198.  
  199. /* void Exit (); */
  200. NS_IMETHODIMP nsAppShell::Exit()
  201. {
  202.     return NS_ERROR_NOT_IMPLEMENTED;
  203. }
  204.  
  205. /* End of implementation class template. */
  206. #endif
  207.  
  208.  
  209. #endif /* __gen_nsIAppShell_h__ */
  210.